<html>
	<head>
	<script id="fragment" type="x-shader/x-fragment">
		precision mediump float;
		
		uniform sampler2D u_Texture0;

		uniform	float u_OffsetX;
		uniform float u_OffsetY;
		
		uniform float u_ScaleX;
		uniform float u_ScaleY;
		
		varying vec4 o_Color;
		varying vec2 o_TexCoord;

		void main()
		{
			gl_FragColor  = texture2D(u_Texture0, vec2(	u_OffsetX+	(u_ScaleX*o_TexCoord.x), u_OffsetY+	(u_ScaleY*o_TexCoord.y) ));
		}
	</script>

	<script id="vertex" type="x-shader/x-vertex">
		//	Very important !!! 
		//	If a vertex attribute is not used by the shader, it won't be found by getVertexLocation

		uniform 		mat4 u_ModelMatrix ;
		uniform 		mat4 u_ViewMatrix;
		uniform 		mat4 u_ProjectionMatrix;
		
		uniform 		sampler2D u_Texture0;

		attribute 	 vec4 	a_Position;
		attribute 	 vec4 	a_Color;
		attribute 	 vec4 	a_Normal;
		attribute 	 vec4 	a_TexCoord0;

		varying 	vec4 	o_Color;
		varying  	vec2	o_TexCoord;

		void main()
		{
			vec4 normal 	= 	a_Normal;
			o_TexCoord 		= 	a_TexCoord0.xy;
			o_Color			=  	a_Color;
			gl_Position 	= 	u_ProjectionMatrix*u_ModelMatrix*u_ViewMatrix*a_Position;
		}
		
	</script>

		<script language="Javascript" src="main.js"> </script>
		
			<script language="Javascript" src="TrollJS/src/Event/Mouse.js"> </script>
			<script language="Javascript" src="TrollJS/src/Event/Event.js"> </script>
			<script language="Javascript" src="TrollJS/src/Event/Clock.js"> </script>

			<script language="Javascript" src="TrollJS/src/Mesh/Vertex.js"> </script>
			<script language="Javascript" src="TrollJS/src/Mesh/Face.js"> </script>
			<script language="Javascript" src="TrollJS/src/Mesh/Mesh.js"> </script>
			
			<script language="Javascript" src="TrollJS/src/OpenGL/BufferObject.js"> </script>
			<script language="Javascript" src="TrollJS/src/OpenGL/Attributes.js"> </script>
			<script language="Javascript" src="TrollJS/src/OpenGL/GLSLProgram.js"> </script>
			<script language="Javascript" src="TrollJS/src/OpenGL/Shader.js"> </script>
					
			<script language="Javascript" src="TrollJS/src/Transformation/Quaternion.js"> </script>
			<script language="Javascript" src="TrollJS/src/Transformation/Matrix.js"> </script>
			<script language="Javascript" src="TrollJS/src/Transformation/Vec4.js"> </script>
			<script language="Javascript" src="TrollJS/src/Transformation/Plane.js"> </script>
			<script language="Javascript" src="TrollJS/src/Transformation/Ray.js"> </script>
			<script language="Javascript" src="TrollJS/src/Transformation/Raycast.js"> </script>
			
			<script language="Javascript" src="TrollJS/src/View.js"> </script>
			<script language="Javascript" src="TrollJS/src/Rect.js"> </script>
			<script language="Javascript" src="TrollJS/src/Maths.js"> </script>
			<script language="Javascript" src="TrollJS/src/Behaviour.js"></script>
			<script language="Javascript" src="TrollJS/src/Sprite.js"> </script>
			<script language="Javascript" src="TrollJS/src/Entity.js"> </script>
			<script language="Javascript" src="TrollJS/src/Image.js"> </script>
			<script language="Javascript" src="TrollJS/src/Application.js"> </script>
			<script language="Javascript" src="TrollJS/src/Lerp.js"> </script>
			<script language="Javascript" src="TrollJS/src/ProjectionOrtho.js"> </script>
			<script language="Javascript" src="TrollJS/src/Transform.js"> </script>
		
			<script language="Javascript" src="Fraternity/Game.js"> </script>
			<script language="Javascript" src="Fraternity/Character.js"> </script>
	</head>
	
	<body onload="Main();">
	
		<canvas id="Scene" width="500" height="500"></canvas>
		<div id="FPSFrame">
			<div id="FPS"></div>
		</div>
		
	</body>

</html>
